from sklearn.model_selection import LeaveOneOut

"""留一法"""

data = [1,2,3,4,5]
loo = LeaveOneOut()

for train,test in loo.split(data):
    print("%s  %s" %(train,test))


